From b6cb04fea016aceb1feae53d232b620d64d8f49a Mon Sep 17 00:00:00 2001 From: Debian Med Packaging Team Date: Wed, 1 Oct 2025 14:43:25 -0400 Subject: [PATCH] zcf-simde-crc32c Gbp-Pq: Name zcf-simde-crc32c --- .../util/compress/zlib_cloudflare/deflate.c | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/c++/src/util/compress/zlib_cloudflare/deflate.c b/c++/src/util/compress/zlib_cloudflare/deflate.c index cb495d3b..9b6fa1d9 100644 --- a/c++/src/util/compress/zlib_cloudflare/deflate.c +++ b/c++/src/util/compress/zlib_cloudflare/deflate.c @@ -129,27 +129,11 @@ static const config configuration_table[10] = { /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ #define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) -#ifdef __aarch64__ - -#include -#include -static uint32_t hash_func(deflate_state *s, void* str) { - return __crc32cw(0, *(uint32_t*)str) & s->hash_mask; -} - -#elif defined __x86_64__ || defined _M_AMD64 - -#include +#include static uint32_t hash_func(deflate_state *s, void* str) { - return _mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; + return simde_mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; } -#else - -#error "Only 64-bit Intel and ARM architectures are supported" - -#endif - /* =========================================================================== * Insert string str in the dictionary and return the previous head * of the hash chain (the most recent string with same hash key). -- 2.30.2